<!--{include(file='selhead.html')}-->
<script type="text/javascript" src="template/jslib/print/jquery.PrintArea.js"></script>
    <div class="content_main">
        <div class="datalist"  id="datalist">
            <div class="data"  id="data" style="overflow:auto;overflow-x:hidden;*+height:780px;height:730px;width:100%">
                <div id="myPrintArea">
					<table  class="table_frame" width="90%" cellspacing="0" cellpadding="0" border="0" align="center">
                       <tr>
                            <td>
								<div style="position:relative">
												<!--{foreach $selprintopt key print}-->
												<div class="resizeDiv2" id="printopt_<!--{$key}-->"
								style="left:<!--{$selprintopt[$key].left}-->px;top:<!--{$selprintopt[$key].top}-->px;
										width:<!--{$selprintopt[$key].width}-->px;height:<!--{$selprintopt[$key].height}-->px"	
												><!--{$print.value}-->
												</div>
												<!--{/foreach}-->
												<!--{if $tpl}-->
													<img src="<!--{$tpl.tplpic}-->"  width="766" height="422" id="bimg"/>
												<!--{else}-->
													<img src="template/admin/images/nopicture.jpg" width="766" height="422" id="bimg"/>
												<!--{/if}-->
								</div>
							</td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
        <div class="data_bottom" id="data_bottom">
            <div class="btn_print">
                <a href="javascript:void(0);" id="btnPrint"><img src="template/admin/images/btn_print.gif" /></a>
            </div>
        </div>
    </div>
</body>
</html>
<script type="text/javascript">
 $(function(){  
		$("#btnPrint").bind("click",function(){  
			$("#myPrintArea").printArea(); 
		});  
		$.oper.setHeight = function(newwidth,newheight){
			if(!newheight || !newwidth) return ;
			var ele = $("#bimg"),width = parseInt(ele.css('width')) || 0,
				height = parseInt(ele.css('height')) || 0;
				sheight = width / newwidth *  newheight,$bimg = $("#bimg");
			$bimg.animate({height:sheight},1000, "linear",function(){
				$bimg[0].height = sheight;
			});
		}
		<!--{if $tpl}-->
		$.oper.setHeight('<!--{def($tpl.width,0)}-->','<!--{def($tpl.height,0)}-->');
		<!--{/if}-->
 });  
</script>